Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add workflow to release to npm on GitHub release #391

Merged
merged 2 commits into from
May 6, 2024
Merged

Conversation

aabounegm
Copy link
Contributor

The secret NPM_TOKEN needs to be added to the repo first by someone who has owner access.

Question: npm defaults the tag to latest, but I see on @v4fire/core (npm) that we use both alpha and beta for v4 releases. Should this be detected and set? And if so, based on what do we set alpha or beta?

@kobezzza
Copy link
Contributor

kobezzza commented Apr 9, 2024

We use the alpha and beta tags when the release cannot yet be called stable.

Stability means the absence of bugs, the presence of tests and documentation, and the overall completion of all APIs.

Since the 4th version of the core hasn't been fully developed yet, we release it as alpha.

@kobezzza
Copy link
Contributor

kobezzza commented Apr 9, 2024

Granted you Owner rights

@aabounegm
Copy link
Contributor Author

Ok, so for the purpose of the CI I think it makes sense to parse the version from package.json and extract the tag from it, right?
For example, for version 4.0.0-alpha.30, the alpha part should be parsed and used for the tag. I'd probably use the semver library for that

@kobezzza
Copy link
Contributor

Yeah, it would be great!

@aabounegm
Copy link
Contributor Author

aabounegm commented Apr 15, 2024

@kobezzza I added the NPM_TOKEN secret and a step to extract the prerelease tag from the version in package.json. I'm not sure how to test it without actually triggering a release, though, so maybe we can test it with the next release?

Note: npm now requires tokens to have an expiration date, so the token I added expires in 1 year (15/04/2025). It will need to be updated then.

@kobezzza
Copy link
Contributor

Great! But you still need to duplicate the MR branch in V4

@aabounegm aabounegm mentioned this pull request Apr 22, 2024
@kobezzza kobezzza merged commit 5b89ffc into master May 6, 2024
4 of 5 checks passed
@aabounegm aabounegm deleted the release-workflow branch May 6, 2024 12:26
@bonkalol
Copy link
Member

bonkalol commented Jun 3, 2024

Hi @aabounegm ! I talked to @kobezzza , and he said that this cool feature is not working. Could you please take a look at what's wrong? It would be great if you could also scale it to v4fire/client.

@aabounegm
Copy link
Contributor Author

Hmm, seems I copied a similar workflow file I had somewhere else, but forgot to update the env var for Yarn. Should be fixed by ac41319, I'll wait till the next release to verify it works and then copy the workflow file to client

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants